/**
 * 
 */
package com.buss.core.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.buss.core.dao.DataModelDao;
import com.buss.core.model.DataModel;
import com.buss.core.persistence.ResultList;
import com.buss.core.service.DataModelService;

/**
 * @author 高小勇
 * 创建时间:2011-5-20
 * wcms2.0
 */
@Service
public class DataModelServiceImpl implements DataModelService {

	@Autowired
	private DataModelDao dataModelDao;
	
	public void saveDataModel(DataModel dataModel) {
		dataModelDao.saveDataModel(dataModel);

	}

	
	public void editDataModel(DataModel dataModel) {
		dataModelDao.editDataModel(dataModel);

	}

	/**
	 * 更新列表模型排序序号
	 * @param ids
	 */
	public void updateListSort(Long[] ids){
		dataModelDao.updateListSort(ids);
	}
	
	/**
	 * 更正编辑页面排序序号
	 * @param ids
	 */
	public void updateEditSort(Long[] ids){
		dataModelDao.updateEditSort(ids);
	}
	
	
	public void deleteDataModel(Long[] ids) {
		dataModelDao.deleteDataModel(ids);

	}

	
	public DataModel loadDataModel(Long id) {
		return dataModelDao.loadDataModel(id);
	}

	
	public ResultList<DataModel> queryDataModel(Long menuId, DataModel dataModel) {
		
		return dataModelDao.queryDataModel(menuId, dataModel);
	}

}
